package edu.mit.media.fv.aqwidgets
{
	import edu.mit.media.fv.aqview.*;
	import edu.mit.media.fv.blocks.*;
	import edu.mit.media.fv.components.*;
	import edu.mit.media.fv.events.*;
	import edu.mit.media.fv.fluidspace.*;
	import edu.mit.media.fv.icons.*;
	
	import flash.display.*;
	import flash.events.*;
	import flash.text.*;

	public class AQNavigator extends AQWidget
	{
		var _users:AQCheckBox;
		var _groups:AQCheckBox;
		var _services:AQCheckBox;
		var _texts:AQCheckBox;
		var _voices:AQCheckBox;
		var _polls:AQCheckBox;
		var _search:AQTextField;
		
		public function AQNavigator()
		{
			super();
			FluidEventHandler.addEventListener(WidgetEvent.DISPLAY_NAVIGATOR, displayWidget);
			
		}
		public function displayWidget(event:WidgetEvent = null):void{
			FluidEventHandler.dispatchEvent(new WidgetEvent(WidgetEvent.DISPLAY_WIDGET, this, "Navigator"));
		}
		
		
		private function searchIn(event:FocusEvent):void{
			if(this._search.text == "Enter Search"){
				this._search.text = "";
			}
		}
				
		private function searchOut(event:FocusEvent = null):void{
			if(this._search.text == null || this._search.text.length < 1){
				this._search.text = "Enter Search";
				var format:TextFormat = new TextFormat();
				format.align = TextFormatAlign.LEFT;
				format.bold = true;
				format.font = "Arial";
				format.size = 20;
				format.color = 0xDDDDDD;
				format.italic = true;
				this._search.setTextFormat(format);
			}
		}
		
		private function querySearch(event:Event = null):void{
			trace("query search");
		}
	}
}